More testsuite cosmetics
authorMatthias Clasen <mclasen@redhat.com>
Tue, 17 Oct 2017 18:50:05 +0000 (02:50 +0800)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 18 Oct 2017 15:30:20 +0000 (17:30 +0200)
Unify the test naming some more.

testsuite/css/nodes/meson.build
testsuite/css/parser/meson.build
testsuite/css/style/meson.build
testsuite/gdk/meson.build
testsuite/gsk/meson.build
testsuite/gsk/test-render-nodes.test.in [new file with mode: 0644]
testsuite/gtk/meson.build
testsuite/tools/meson.build

index 6c6612e16928a50470dace784573bd87913b24ef..ae9860839c695005ff4d00aa5e15beed1e1aa3a8 100644 (file)
@@ -9,7 +9,7 @@ test_nodes = executable('test-css-nodes', 'test-css-nodes.c',
                         install: get_option('install-tests'),
                         install_dir: testexecdir,
                         dependencies: libgtk_dep)
-test('test-nodes', test_nodes, suite: 'css', env: test_env)
+test('nodes', test_nodes, suite: 'css', env: test_env)
 
 test_data = [
   'box.ltr.nodes',
index 8c5e3d444a06d6d20f38d168478564ba33b96fba..2c36e153f88a44f7d5e5f13aaf96a54eabd96892 100644 (file)
@@ -10,7 +10,7 @@ test_parser = executable('test-css-parser', 'test-css-parser.c',
                          install: get_option('install-tests'),
                          install_dir: testexecdir,
                          dependencies: libgtk_dep)
-test('css-parser', test_parser, suite: 'css', env: test_env)
+test('parser', test_parser, suite: 'css', env: test_env)
 
 test_data = [
   'animation-crash-3.12.css',
index 394bca11b5027ec9f895606262583b783a643811..79cd90a44af21662aab24a96d1226a838980e85b 100644 (file)
@@ -20,7 +20,7 @@ test_style = executable(
   install_dir: testexecdir,
   dependencies: libgtk_dep,
 )
-test('test-style', test_style, suite: 'css', env: test_env)
+test('style', test_style, suite: 'css', env: test_env)
 
 test_data = [
   'adjacent-states.css',
index cc33a7b3b1962bb89fb8f990bede736cdf712464..b74d6544224fc8aca9e711819a93a2c3b7c3532f 100644 (file)
@@ -17,7 +17,7 @@ test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
 foreach t : tests
   test_exe = executable(t, '@0@.c'.format(t), dependencies : libgtk_dep)
 
-  test('@0@ test'.format(t), test_exe, suite : 'gdk', env : test_env)
+  test(t, test_exe, suite : 'gdk', env : test_env)
 endforeach
 
 # TODO: installed tests + .test files
index d5ad54d59ccd66c35e34c75abe9bdaec6a3ba75d..b16d074c3b21805949f7d57975a92bfa168e25b9 100644 (file)
@@ -1,7 +1,48 @@
+test_env = environment()
+test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
+test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
+test_env.set('GSETTINGS_BACKEND', 'memory')
+test_env.set('G_ENABLE_DIAGNOSTIC', '0')
+
 test_render_nodes = executable(
   'test-render-nodes',
   ['test-render-nodes.c',
    'reftest-compare.c'],
   dependencies: libgtk_dep,
 )
-test('test-render-nodes', test_render_nodes, suite: 'gsk')
+
+test('test-render-nodes', test_render_nodes, suite: 'gsk', env: test_env)
+
+test_data = [
+  'blendmode.node',
+  'blendmode.png',
+  'blendmodes.node',
+  'blendmodes.png',
+  'cairo.node',
+  'cairo.png',
+  'colors.cairo.png',
+  'colors.node',
+  'colors.vulkan.png',
+  'cross-fade.node',
+  'cross-fade.png',
+  'cross-fades.node',
+  'cross-fades.png',
+  'ducky.png',
+  'repeat.node',
+  'repeat.png',
+  'transform.node',
+  'transform.png',
+]
+
+if get_option('install-tests')
+  conf = configuration_data()
+  conf.set('libexecdir', gtk_libexecdir)
+  configure_file(input: 'test-render-nodes.test.in',
+                 output: 'test-render-nodes.test',
+                 configuration: conf,
+                 install_dir: installed_test_datadir)
+
+  install_data(test_data, install_dir: testexecdir)
+
+endif
+
diff --git a/testsuite/gsk/test-render-nodes.test.in b/testsuite/gsk/test-render-nodes.test.in
new file mode 100644 (file)
index 0000000..4ea3baa
--- /dev/null
@@ -0,0 +1,4 @@
+[Test]
+Exec=/bin/sh -c "cd @libexecdir@/installed-tests/gtk-4.0/gsk && @libexecdir@/installed-tests/gtk-4.0/gsk/test-render-nodes --tap"
+Type=session
+Output=TAP
index 2afb14a3fcdcae14447f1c9869454ff7ea04d08a..a772a716135f38d1e7d6d6a4a49f8cf56c6d8a29 100644 (file)
@@ -77,7 +77,7 @@ foreach t : tests
     link_args : test_extra_ldflags,
     dependencies : libgtk_dep)
 
-  test('@0@ test'.format(test_name), test_exe, suite : 'gtk', env : test_env)
+  test(test_name, test_exe, suite : 'gtk', env : test_env)
 endforeach
 
 # FIXME: if objc autotestkeywords_CPPFLAGS += -DHAVE_OBJC=1 -x objective-c++
@@ -86,7 +86,7 @@ if add_languages('cpp')
     'autotestkeywords.cc',
     c_args : test_cargs + ['-Idummy-headers'],
     dependencies : libgtk_dep)
-  test('autotestkeywords test', test_exe, suite : 'gtk', env : test_env)
+  test('c++ keywords', test_exe, suite : 'gtk', env : test_env)
 endif
 
 # FIXME: schemas from gtk+ dir?
index 316b0b64c54561728ab1e50643b909749be576e9..2515aa548ecbaa40ce9771f3eb1d3eb098e63787 100644 (file)
@@ -9,7 +9,7 @@ if bash.found()
       input : 'test-@0@.in'.format(t),
       configuration : configuration_data())
 
-    test('test-@0@'.format(t), bash,
+    test(t, bash,
       args : 'test-@0@'.format(t),
       workdir : meson.current_build_dir(),
       env : test_env,